﻿@model IEnumerable<AuditModel.Attachment>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/CountyAdmin/_CountyAdminLayout.cshtml";
}

<h2>上传更多附件（@ViewBag.ArchiveID）</h2>
<div class="padding_panel">
@using (Html.BeginForm("Create", "Attachment", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    <input type="file" name="file" id="file" />
    <input type="hidden" name="id" value="@ViewBag.ArchiveID" />
    <input type="submit" value="@AuditResources.UI.Upload" />
}
</div>
<table>
    <tr>
        <th>
            文件
        </th>
        <th></th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
            @AuditWeb.Helpers.Link(this.Html, item.FilePath,item.Title,"_self")
        </td>
        <td>
            @Html.ActionLink(AuditResources.UI.Delete, "Delete", new { id = item.ArchiveID, title = item.Title }, new { @class = "button", onclick = "return confirm('确定要删除吗？')" })
        </td>
    </tr>
}

</table>
<div class="padding_panel">
@Html.ActionLink("返回参赛档案编辑", "Edit", "Archive", new { id = ViewBag.ArchiveID }, new { @class = "button" })
</div>
